<template>

  <div class="rechargeRecord">
    
    <ul class="recharge">
      <li class="flex" v-for="item in list">
        <div class="recharge_left">
          <p class="recharge_name">充值</p>
          <p class="recharge_time">{{item.addtime}}</p>
        </div>
        <p class="recharge_price">+{{item.money}}</p>
      </li>
    </ul>

  </div>  

</template>



<script>
import axios from 'axios'
import global from '../../../utils/global'
import store from '../../../utils/store'  
export default {
  name: 'rechargeRecord',
  data () {
    return {
      list: [],
    }
  },
  mounted(){
    this.getInfo();
    this.$root.share();
  },
  methods: {
    // 获取数据
    getInfo(){

      var that = this;

      axios.get(global.api.carRecharge.record,{
        params: {
          uuid: localStorage.getItem('carWashUuid'),
        }
      })

      .then(function(res){
        console.log("then");
        console.log(res);
        that.list = res.data.data
      })

      .catch(function(res){
        console.log("catch");
        console.log(res);
      })  

    }
  }
}
</script>



<style scoped>
  .rechargeRecord{

  }
  .recharge{

  }
  .recharge li{
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #B3B3B4;
    padding:  0.5rem 1rem 0.5rem 1rem;
  }
  .recharge_left{
    text-align: left;
  }
  .recharge_name{
    font-size: 1rem;
    color: #000000;
    padding-bottom: 0.5rem;
  }
  .recharge_time{
    font-size: 0.85rem;
    color: #888888;
  }
  .recharge_price{
    font-size: 1rem;
    color: #18C673;
  }
</style>
<style>
  ul,li,div,a,p,span{
    margin: 0;
    padding: 0;
  }
  li{
    list-style: none;
  }
  .flex{
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
  }
</style>